.class public Lnbisdk/ec;
.super Ljava/lang/Object;


# static fields
.field private static gz:Lnbisdk/ec;


# instance fields
.field private gA:Lnbisdk/jg;

.field private gB:Lnbisdk/dw;

.field private gr:Lnbisdk/bl;


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method private F(Ljava/lang/String;)Lnbisdk/jg;
    .locals 1

    iget-object v0, p0, Lnbisdk/ec;->gB:Lnbisdk/dw;

    invoke-virtual {v0, p1}, Lnbisdk/dw;->E(Ljava/lang/String;)Lnbisdk/jg;

    move-result-object v0

    return-object v0
.end method

.method public static a(Lnbisdk/jg;Lnbisdk/jg;)Z
    .locals 2

    invoke-virtual {p0}, Lnbisdk/jg;->gZ()I

    move-result v0

    invoke-virtual {p1}, Lnbisdk/jg;->gZ()I

    move-result v1

    if-ne v0, v1, :cond_0

    invoke-virtual {p0}, Lnbisdk/jg;->ha()I

    move-result v0

    invoke-virtual {p1}, Lnbisdk/jg;->ha()I

    move-result v1

    if-ne v0, v1, :cond_0

    invoke-virtual {p0}, Lnbisdk/jg;->cc()I

    move-result v0

    invoke-virtual {p1}, Lnbisdk/jg;->cc()I

    move-result v1

    if-ne v0, v1, :cond_0

    invoke-virtual {p0}, Lnbisdk/jg;->getType()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1}, Lnbisdk/jg;->getType()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private static b(Lnbisdk/bl;)I
    .locals 2

    invoke-virtual {p0}, Lnbisdk/bl;->jw()Landroid/content/Context;

    move-result-object v0

    const-string v1, "window"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Landroid/view/WindowManager;

    invoke-interface {p0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v0

    invoke-virtual {v0}, Landroid/view/Display;->getWidth()I

    move-result v1

    invoke-virtual {v0}, Landroid/view/Display;->getHeight()I

    move-result v0

    invoke-static {v1, v0}, Ljava/lang/Math;->max(II)I

    move-result v0

    return v0
.end method

.method public static dT()Lnbisdk/ec;
    .locals 2

    sget-object v0, Lnbisdk/ec;->gz:Lnbisdk/ec;

    if-nez v0, :cond_1

    const-class v0, Lnbisdk/ec;

    monitor-enter v0

    :try_start_0
    sget-object v1, Lnbisdk/ec;->gz:Lnbisdk/ec;

    if-nez v1, :cond_0

    new-instance v1, Lnbisdk/ec;

    invoke-direct {v1}, Lnbisdk/ec;-><init>()V

    sput-object v1, Lnbisdk/ec;->gz:Lnbisdk/ec;

    :cond_0
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :cond_1
    sget-object v0, Lnbisdk/ec;->gz:Lnbisdk/ec;

    return-object v0

    :catchall_0
    move-exception v1

    :try_start_1
    monitor-exit v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v1
.end method


# virtual methods
.method public final M(I)I
    .locals 2

    invoke-virtual {p0}, Lnbisdk/ec;->cc()I

    move-result v0

    const/16 v1, 0x40

    if-ne v0, v1, :cond_0

    add-int/lit8 v0, p1, -0x2

    :goto_0
    return v0

    :cond_0
    const/16 v1, 0x80

    if-ne v0, v1, :cond_1

    add-int/lit8 v0, p1, -0x1

    goto :goto_0

    :cond_1
    move v0, p1

    goto :goto_0
.end method

.method public final N(I)I
    .locals 2

    invoke-virtual {p0}, Lnbisdk/ec;->cc()I

    move-result v0

    const/16 v1, 0x40

    if-ne v0, v1, :cond_0

    add-int/lit8 v0, p1, 0x2

    :goto_0
    return v0

    :cond_0
    const/16 v1, 0x80

    if-ne v0, v1, :cond_1

    add-int/lit8 v0, p1, 0x1

    goto :goto_0

    :cond_1
    move v0, p1

    goto :goto_0
.end method

.method public final a(Lnbisdk/bl;)V
    .locals 1

    iget-object v0, p0, Lnbisdk/ec;->gr:Lnbisdk/bl;

    if-nez v0, :cond_0

    iput-object p1, p0, Lnbisdk/ec;->gr:Lnbisdk/bl;

    new-instance v0, Lnbisdk/dw;

    invoke-direct {v0, p1}, Lnbisdk/dw;-><init>(Lnbisdk/bl;)V

    iput-object v0, p0, Lnbisdk/ec;->gB:Lnbisdk/dw;

    const-string v0, "road"

    invoke-direct {p0, v0}, Lnbisdk/ec;->F(Ljava/lang/String;)Lnbisdk/jg;

    move-result-object v0

    iput-object v0, p0, Lnbisdk/ec;->gA:Lnbisdk/jg;

    new-instance v0, Lnbisdk/ec$1;

    invoke-direct {v0, p0}, Lnbisdk/ec$1;-><init>(Lnbisdk/ec;)V

    invoke-virtual {p1, v0}, Lnbisdk/bl;->b(Lnbisdk/rh;)V

    :cond_0
    return-void
.end method

.method public final b(Lnbisdk/jg;)V
    .locals 2

    const/4 v0, 0x1

    iget-object v1, p0, Lnbisdk/ec;->gA:Lnbisdk/jg;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lnbisdk/ec;->gA:Lnbisdk/jg;

    invoke-static {p1, v1}, Lnbisdk/ec;->a(Lnbisdk/jg;Lnbisdk/jg;)Z

    move-result v1

    if-eqz v1, :cond_0

    const/4 v0, 0x0

    :cond_0
    if-eqz v0, :cond_1

    iget-object v0, p0, Lnbisdk/ec;->gB:Lnbisdk/dw;

    const-string v1, "road"

    invoke-virtual {v0, v1, p1}, Lnbisdk/dw;->a(Ljava/lang/String;Lnbisdk/jg;)V

    const-string v0, "road"

    invoke-direct {p0, v0}, Lnbisdk/ec;->F(Ljava/lang/String;)Lnbisdk/jg;

    move-result-object v0

    iput-object v0, p0, Lnbisdk/ec;->gA:Lnbisdk/jg;

    :cond_1
    return-void
.end method

.method public final cc()I
    .locals 3

    const/16 v2, 0x100

    iget-object v0, p0, Lnbisdk/ec;->gA:Lnbisdk/jg;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/ec;->gA:Lnbisdk/jg;

    invoke-virtual {v0}, Lnbisdk/jg;->cc()I

    move-result v0

    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lnbisdk/ec;->gr:Lnbisdk/bl;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lnbisdk/ec;->gr:Lnbisdk/bl;

    invoke-static {v0}, Lnbisdk/ec;->b(Lnbisdk/bl;)I

    move-result v0

    const/16 v1, 0x280

    if-ge v0, v1, :cond_1

    const/16 v0, 0x80

    goto :goto_0

    :cond_1
    move v0, v2

    goto :goto_0
.end method

.method public final dU()V
    .locals 1

    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/ec;->gA:Lnbisdk/jg;

    iput-object v0, p0, Lnbisdk/ec;->gB:Lnbisdk/dw;

    iput-object v0, p0, Lnbisdk/ec;->gr:Lnbisdk/bl;

    return-void
.end method

.method public final dV()Lnbisdk/jg;
    .locals 1

    iget-object v0, p0, Lnbisdk/ec;->gA:Lnbisdk/jg;

    return-object v0
.end method

.method public final dW()I
    .locals 5

    const/4 v4, 0x2

    iget-object v0, p0, Lnbisdk/ec;->gr:Lnbisdk/bl;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lnbisdk/ec;->gr:Lnbisdk/bl;

    invoke-static {v0}, Lnbisdk/ec;->b(Lnbisdk/bl;)I

    move-result v0

    invoke-virtual {p0}, Lnbisdk/ec;->cc()I

    move-result v1

    div-int/2addr v0, v1

    add-int/lit8 v0, v0, 0x1

    int-to-double v0, v0

    invoke-static {v0, v1}, Ljava/lang/Math;->log(D)D

    move-result-wide v0

    const-wide/high16 v2, 0x4000

    invoke-static {v2, v3}, Ljava/lang/Math;->log(D)D

    move-result-wide v2

    div-double/2addr v0, v2

    invoke-static {v0, v1}, Ljava/lang/Math;->ceil(D)D

    move-result-wide v0

    double-to-int v0, v0

    add-int/lit8 v0, v0, 0x1

    invoke-static {v4, v0}, Ljava/lang/Math;->max(II)I

    move-result v0

    :goto_0
    iget-object v1, p0, Lnbisdk/ec;->gA:Lnbisdk/jg;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lnbisdk/ec;->gA:Lnbisdk/jg;

    invoke-virtual {v1}, Lnbisdk/jg;->gZ()I

    move-result v1

    invoke-static {v0, v1}, Ljava/lang/Math;->max(II)I

    move-result v0

    :cond_0
    invoke-virtual {p0, v0}, Lnbisdk/ec;->M(I)I

    move-result v0

    return v0

    :cond_1
    move v0, v4

    goto :goto_0
.end method

.method public final dX()I
    .locals 1

    iget-object v0, p0, Lnbisdk/ec;->gA:Lnbisdk/jg;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/ec;->gA:Lnbisdk/jg;

    invoke-virtual {v0}, Lnbisdk/jg;->ha()I

    move-result v0

    :goto_0
    invoke-virtual {p0, v0}, Lnbisdk/ec;->M(I)I

    move-result v0

    return v0

    :cond_0
    const/16 v0, 0x13

    goto :goto_0
.end method
